package com.fresh.service;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fresh.entity.FreshGoods;
import com.fresh.qo.GoodsQO;

import java.util.List;

public interface GoodsService extends IService<FreshGoods> {

    List<FreshGoods> getAll();


    /**
     * 分页查询与条件查询
     * @param goodsQO
     * @return
     */
    IPage<FreshGoods> getByConditionAndPage(GoodsQO goodsQO);

    FreshGoods selectById(Long goodsId);

    void updateById(Long  goodsId, Integer stock);

    void initGoodsInRedis(Integer goodsId, Integer stock);

    void importDataToDB(FreshGoods freshGoods);

}
